package com.ileaf.pattern01;

import com.ileaf.java8.StringConst;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class Main {

    public static void main(String[] args) {
        String param = "%7B%22eventType%22%3A%22UPDATE_AFTER%22%2C%22sourceID%22%3A%22BASEDOC%22%2C%22tenantCode%22%3A%22ynacgpnt%22%2C%22userObject%22%3A%7B%22doctype%22%3A%22position%22%2C%22data%22%3A%7B%22positionId%22%3A%224ba837e771d149ddb13d0b0cd99403f3%22%2C%22tenantId%22%3A%22ynacgpnt%22%7D%2C%22model%22%3A%7B%22creator%22%3A%22yql_admin%22%2C%22code%22%3A%22c1_A1001%22%2C%22sysid%22%3A%22diwork%22%2C%22modifier%22%3A%22yql_admin%22%2C%22dr%22%3A0%2C%22modifiedtime%22%3A1548066046000%2C%22enable%22%3A1%2C%22org_id%22%3A%226049b20853a6427da8bf7d087e68a5b2%22%2C%22name%22%3A%22c1%22%2C%22tenantid%22%3A%22ynacgpnt%22%2C%22creationtime%22%3A1548060389000%2C%22id%22%3A%224ba837e771d149ddb13d0b0cd99403f3%22%2C%22dept_id%22%3A%2266c1dfd6d5c74bf0bc55e79bd9f67222%22%2C%22ts%22%3A1548066045892%7D%2C%22operator%22%3A%22UPDATE_AFTER%22%2C%22option%22%3A%22updatePosition%22%7D%2C%22uuid%22%3A%22758add05-d4c7-4db5-9494-a4c651243e6a%22%7D";
        String vars = "{\"doctype\":\"adminorg\",\"data\":{\"tenantId\":\"e6c6g1x2\",\"deptId\":\"4746c807f0ac4e4d9cca5f640ee68491\",\"deptType\":1},\"model\":{\"ancestorpath\":\"197767e104a3413081421919f5af7a2f\",\"code\":\"0008\",\"corpid\":\"196a1618e89c4576a7e12d0e52086382\",\"creationtime\":1548131831000,\"creator\":\"3c817079-2dfe-4a5f-9ee8-113cf7451b44\",\"depth\":2,\"displayorder\":1000041,\"dr\":0,\"effectivedate\":1548131839000,\"enable\":2,\"expirationdate\":1548142486647,\"id\":\"4746c807f0ac4e4d9cca5f640ee68491\",\"modifiedtime\":1548142486647,\"modifier\":\"3c817079-2dfe-4a5f-9ee8-113cf7451b44\",\"name\":\"用友网络科技股份有限公司四川分公司\",\"name2\":\"\",\"name3\":\"\",\"name4\":\"\",\"orgid\":\"4746c807f0ac4e4d9cca5f640ee68491\",\"orgtype\":1,\"parentid\":\"197767e104a3413081421919f5af7a2f\",\"shortname\":\"用友四川分公司\",\"sysid\":\"diwork\",\"tenantid\":\"e6c6g1x2\",\"ts\":1548142486647},\"operator\":\"DISABLE_AFTER\",\"option\":\"updateDept\"}";
//        try {
//            String decode = URLDecoder.decode(param, StringConst.UTF_8);
//            System.out.println(decode);
//            String varsDe = URLDecoder.decode(vars, StringConst.UTF_8);
//            System.out.println(varsDe);
//        } catch (UnsupportedEncodingException e) {
//            e.printStackTrace();
//        }


        String loc = "classpath*:/${dbtype}/**/*.mapper.xml";
        String all = loc.replaceAll("\\$\\{dbtype\\}", null);
        System.out.println(all);
    }
}
